import Mock, { mock } from 'mockjs';
import jwt from 'jsonwebtoken';
Mock.mock('/api/list',{
    "list|4":[{
        "id":"@id",
        "txt":"@ctitle(2)",
        "children|20":[{
            "id":"@id",
            "txt":"@ctitle(6)",
            "src":"@image(100x100,@color)",
            "price|100-1000":0,
            "flag":false,
            "img":[{
                "src":"@image(100x100,@color)",
            }]
        }]
    }]
})

let token = 'Bearer ' + jwt.sign({ foo: 'bar' }, 'shhhhh');
Mock.mock('/api/Login',{
    code:200,
    message:'登录成功',
    data:token
})